export type TDate = Date | string | number

export type TToastIcon = 'none' | 'success' | 'loading' | 'error' | 'fail' | 'exception' | undefined

export type TToastPosition = 'bottom' | 'top' | 'center' | undefined

export type TVoidFn = () => void

export type TStrOrNum = string | number

export type TBaseType = string | number | boolean | undefined | null

export type TSwitchType = 'navigateTo' | 'redirectTo' | 'reLaunch' | 'switchTab'

export type TChooseFileCount = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10

export type TChooseFileSourceType = Array<'album' | 'camera'>

export type TChooseFileSizeType = Array<'original' | 'compressed'>

export type TRequestData = string | AnyObject | ArrayBuffer

export type TRequestMethods = 'GET' | 'POST' | 'PUT' | 'DELETE' | 'CONNECT' | 'HEAD' | 'OPTIONS' | 'TRACE'

export type TListCard = 'history' | 'evaluate' | 'myAssessment' | 'receive' | 'subscribe' | 'receive-subscribe' | 'subscribe-history' | null

export type IPayType = 'WXPAY' | 'ALIPAY' | ''

export interface AnyObject {
    [key: string]: any;
}
export interface IDateRule{
    'M+':number
    'D+':number
    'h+':number
    'm+':number
    's+':number
    'q+':number
    S:number
    W:number
}

export interface ILoading{
    hide(): void
}

export interface IRequestHeader{
    'Content-Type':string
    TOKEN?:string
    [propsName:string]:any
}
export interface IRequestOptions{
    url:string
    method?:TRequestMethods
    dataType?:string
    header?:IRequestHeader
    data?:TRequestData
}

export interface ILocation {
    lat: string
    lng: string
}

export interface ICommentInfo{
    tno:string
    uid:string
    paySerialNo:string
    serviceNo?:string
}

export interface IGetList<T, K>{
    _has_more: boolean
    api: any
    params: T
    page_size: number
    page: number
    initData?: (data: K) => AnyObject[],
    getList(): Promise<AnyObject[]>
    nextPage(): Promise<AnyObject[]>
    reload(): Promise<AnyObject[]>
    clear(): Promise<AnyObject[]>
}

export interface ISubscribeInfo{
    userRemark?: string
    username: string
    userGender: TStrOrNum
    userTel: string
    userWx: string
    userAddress: string
    userAddressSecond: string
    serviceTimeStr: string
}
